/**
 * @description 生产问卷列表
 */
const Mock = require("mockjs");
const Random = Mock.Random;
function getQuestionList(obj) {
  const { isDeleted, isStar, len = 10 } = obj;
  return new Array(len).fill(0).map(() => {
    return {
      _id: Random.id(),
      title: Random.ctitle(),
      isPublished: Random.boolean(),
      isStar: isStar ? true : Random.boolean(),
      answerCount: Random.natural(),
      createdAt: Random.datetime(),
      isDeleted,
    };
  });
}
module.exports = getQuestionList;
